import { channels } from '@/api/catagtory'
export default {
  namespaced: true,
  state: {
    xxx: '123',
    catagtoryList: [], // 存储分类数据
    currIndex: 0
  },
  mutations: {
    // 修改分类数据
    setCatagtoryList (state, value) {
      state.catagtoryList = value
    },
    // 修改currIndex
    setCurrIndex (state, value) {
      state.currIndex = value
    }
  },
  actions: {
    // 调用接口获取分类数据
    async channels (ctx) {
      const res = await channels()
      ctx.commit('setCatagtoryList', res.data.channels)

      console.log(3)
    }
  },
  getters: {}
}
